import baseUrl from "@/utils/version.js";

const urls = "/api/" + baseUrl.system.v1;

export default function () {
    const request_des = (method, path, id) => {
        let val = "";
        if (method === "POST") {
            switch (path) {
                case urls + "/login":
                    val = "用户登录"
                    break
                case urls + "/logout":
                    val = "注销用户"
                    break
            }
        } else if (method === "PUT") {
            switch (path) {
                case urls + "/menu/" + id:
                    val = "修改菜单"
                    break
                case urls + "/menu/status/" + id:
                    val = "修改菜单状态"
                    break
            }
        } else if (method === "DELETE") {
            console.log(id)
            switch (path) {
                case urls + "/menu/" + id:
                    val = "删除菜单"
                    break
            }
        }
        return val;
    };

    return {
        request_des,
    }
}